home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 4 / Night Owl's Shareware - PDSI-004-1 - Wayzata Technology (1990).iso / 029b / phone.rpt < prev    next >
Text File  |  1990-09-09  |  6KB  |  139 lines

  1.      /*******************************************************/
  2.      /* This report script will create a report of all      */
  3.      /* users, sorted by home phone number and name.  The   */
  4.      /* output will be sent to a disk file called PHONE.TXT */
  5.      /*******************************************************/
  6.  
  7.      /*******************************************************/
  8.      /* Note that the report scripts look a great deal like */
  9.      /* C code!  ALL report script commands are in upper    */
  10.      /* case.  References to user file or message file      */
  11.      /* fields are detailed in the documentation.           */
  12.      /*******************************************************/
  13.  
  14.  
  15.      /*******************************************************/
  16.      /* All report scripts must begin with START            */
  17.      /*******************************************************/
  18.  
  19. START
  20.  
  21.  
  22.      /*******************************************************/
  23.      /* Virtual fields are used within the report.  They    */
  24.      /* are normally used to provide computations.  For     */
  25.      /* instance, the username field is taking the user's   */
  26.      /* first name and last name, striping off the spaces   */
  27.      /* and then joining the two names together.            */
  28.      /*******************************************************/
  29.  
  30.  
  31. VIRTUAL
  32.  
  33.   userfile      STRING  32      "D:\GAP\MAIN\USERS.DAT"
  34.   username      STRING  32      sysop <> 1 ? STRIP(first) # " " # STRIP(last) :
  35.                                 "SYSOP"
  36.  
  37.  
  38.  
  39.      /*******************************************************/
  40.      /* The SEARCH section is where you tell the report     */
  41.      /* generator how to search the file.  In this case, we */
  42.      /* are searching by the userindex.  The same way you   */
  43.      /* see the users in GAPUSER.                           */
  44.      /*******************************************************/
  45.  
  46.  
  47. SEARCH 
  48.  
  49.   FILE userfile USING_KEY user_index
  50.  
  51.  
  52.  
  53.      /*******************************************************/
  54.      /* The SELECTION section is where you tell the report  */
  55.      /* generator how to select individual records.  For    */
  56.      /* instance, you could tell it to to select ONLY those */
  57.      /* users with a level of 90 or greater.                */
  58.      /*******************************************************/
  59.  
  60.  
  61. SELECT
  62.  
  63.   ALL
  64.  
  65.  
  66.  
  67.      /*******************************************************/
  68.      /* The sort section allows you to format the report in */
  69.      /* any order you wish.  It must be realized however    */
  70.      /* that in using SORTS, the report generator will need */
  71.      /* to actually sort the data before it prints the      */
  72.      /* report.  This may take some time with large files.  */
  73.      /*******************************************************/
  74.  
  75.      
  76. SORT USING_KEY                      /* format report according to the      */
  77.                                     /* following fields.                   */
  78.   DSC_NO_MOD    sysop               /*  By sysop flag (IMPORTANT!)         */
  79.   NO_MOD        home_phone          /*  By home phone                      */
  80.   NO_MOD        last                /*  By last name  (ascending order)    */
  81.   NO_MOD        first               /*  By first name (ascending order)    */
  82.  
  83.  
  84.  
  85.      /*******************************************************/
  86.      /* The DISPLAY section is where you tell the report    */
  87.      /* generator where to send the report.  Output can be  */
  88.      /* directed to any valid DOS device.                   */
  89.      /*******************************************************/
  90.  
  91.  
  92. DISPLAY
  93.  
  94.   DEVICE        OUTFILE
  95.   PAGE_LENGTH   0                     /* no page formatting */
  96.  
  97.  
  98.      /*******************************************************/
  99.      /* The IMAGE section is where the report is actually   */
  100.      /* produced.   You set up exactly how you want the     */
  101.      /* report to appear, and the report generator will     */
  102.      /* substitute your user or message fields in place of  */
  103.      /* of the format specifications.                       */
  104.      /*                                                     */
  105.      /* Anything after a '+' is printed except that the     */
  106.      /* format specifications are substitued with the       */
  107.      /* actual fields that appear in the line beneath.      */
  108.      /*                                                     */
  109.      /* Inside the body, you may refer to either an actual  */
  110.      /* DODA name, or a name that was defined in the        */
  111.      /* VIRTUAL section above.  For instance, "username"    */
  112.      /* does not exists as one of the DODA names but it was */
  113.      /* defined in the VIRTUAL section as a formula to use  */
  114.      /* "first" and "last" (both defined in DODA)           */
  115.      /*******************************************************/
  116.  
  117.  
  118.      /*******************************************************/
  119.      /*  NOTE!!!  DO NOT place any comments after a line    */
  120.      /*  that begins with a '+'!  If you do, then your      */
  121.      /*  comments will be printed and/or shown!             */
  122.      /*******************************************************/
  123.  
  124.  
  125.  
  126. IMAGE
  127.  
  128. BODY
  129. + HP : @xxxxxxxxxxxxxx    Name : @xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  130.        home_phone                username
  131.         
  132.         
  133.      /*******************************************************/
  134.      /* EXIT must be the last line in each script           */
  135.      /*******************************************************/
  136.  
  137.  
  138. EXIT
  139.